package com.yupi.mianshiya.service.impl;

import com.yupi.mianshiya.model.entity.TaskMessage;
import org.checkerframework.checker.units.qual.A;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MessageQueryService {
    @Autowired
    private RabbitTemplate rabbitTemplate;
    public void sendMessage(TaskMessage taskMessage) {
        rabbitTemplate.convertAndSend(taskMessage.getExchange(), taskMessage.getRoutingKey(), taskMessage.getTaskId());
    }
}
